package pl.myapp.webtest.qualifier;

import org.slf4j.Logger;
import pl.myapp.webtest.config.qualifier.MyLogger;
import pl.myapp.webtest.qualifier.annotation.CoffeeTasteQualify;
import pl.myapp.webtest.qualifier.annotation.StringOne;
import pl.myapp.webtest.qualifier.annotation.StringTwo;
import pl.myapp.webtest.qualifier.annotation.Taste;
import pl.myapp.webtest.qualifier.business.TestTasteOfCoffee;

import javax.enterprise.inject.Model;
import javax.inject.Inject;

/**
 * Created by IntelliJ IDEA.
 * User: Marek Rucki
 * Date: 16.05.11
 * Time: 13:04
 */
@Model
public class CofeeManaged {
    @Inject
	@MyLogger
    Logger logger;

    @Inject
    @CoffeeTasteQualify(value = Taste.OK)
    TestTasteOfCoffee goodCoffee;

    @Inject
    @CoffeeTasteQualify(value = Taste.NOT_BAD)
    TestTasteOfCoffee notBadCoffee;

    @Inject
    @StringOne
    String stringOne;

    @Inject
    @StringTwo
    String stringTwo;

    public void testTaste() {
        logger.info("Some coffee is ");
        goodCoffee.testTaste();
        logger.info("some other is ");
        notBadCoffee.testTaste();

        logger.info("test metod produkcyjnych: "+stringOne+" "+stringTwo);
    }
}
